home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-05-03 | 101.6 KB | 3,669 lines |
- Newsgroups: comp.sources.unix
- From: pmiller@bmr.gov.au (Peter Miller)
- Subject: v26i209: cook-1.4 - a file construction tool (like "make"), Part01/11
- Sender: unix-sources-moderator@efficacy.home.vix.com
- Approved: WhoAmI@efficacy.home.vix.com
-
- Submitted-By: pmiller@bmr.gov.au (Peter Miller)
- Posting-Number: Volume 26, Issue 209
- Archive-Name: cook-1.4/part01
-
- NAME
- cook - a file construction tool
-
- DESCRIPTION
- Put simply, the cook program is yet another make-oid.
-
- The cook program is a tool for constructing files. It is
- given a set of files to create, and recipes of how to
- create them. In any non-trivial program there will be
- prerequisites to performing the actions necessary to
- creating any file, such as include files. The cook
- program provides a mechanism to define these.
-
- When a program is being developed or maintained, the
- programmer will typically change one file of several which
- comprise the program. The cook program examines the last-
- modified times of the files to see when the prerequisites
- of a file have changed, implying that the file needs to be
- recreated as it is logically out of date.
-
- The cook program also provides a facility for implicit
- recipes, allowing users to specify how to form a file with
- a given suffix from a file with a different suffix. For
- example, to create filename.o from filename.c
-
- AUTHOR
- Peter Miller UUCP uunet!munnari!bmr.gov.au!pmiller
- /\/\* Internet pmiller@bmr.gov.au
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 11)."
- # Contents: MANIFEST README aux aux/CHANGES.sh aux/Makefile.awk c_incl
- # c_incl/cache.h c_incl/os.h common common/help.h common/main.h
- # common/mem.h common/patchlevel.h common/version.h conf cook
- # cook/builtin.h cook/env.h cook/glob.h cook/hashline.h
- # cook/listing.h cook/parse.h cooktime cooktime/date.h doc
- # doc/version.so find_libs find_libs/os.h h h/float.h h/limits.h
- # h/stdarg.h-min h/stddef.h h/stdlib.h h/string.h h/time.h lib
- # lib/as lib/gcc lib/home lib/print lib/sccs lib/text lib/usr
- # lib/usr.local man1 man1/install.sh roffpp roffpp/preprocess.h test
- # test/00 test/00/t0001a.sh test/00/t0003a.sh test/00/t0004a.sh
- # test/00/t0006a.sh test/00/t0008a.sh test/00/t0010a.sh
- # test/00/t0011a.sh test/00/t0012a.sh test/00/t0013a.sh
- # test/00/t0014a.sh test/00/t0016a.sh test/00/t0017a.sh
- # test/00/t0019a.sh test/00/t0020a.sh test/00/t0021a.sh
- # test/00/t0022a.sh test/00/t0023a.sh test/00/t0025a.sh
- # test/00/t0026a.sh test/00/t0028a.sh test/00/t0029a.sh
- # test/00/t0033a.sh test/00/t0035a.sh test/00/t0036a.sh
- # Wrapped by vixie@efficacy.home.vix.com on Tue May 4 01:36:33 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(5986 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X BUILDING 4
- X CHANGES 10
- X LICENSE 8
- X MANIFEST 1
- X Makefile 7
- X README 1
- X aux 1
- X aux/BUILDING.man 5
- X aux/CHANGES.sh 1
- X aux/Howto.cook 5
- X aux/MANIFEST.sh 2
- X aux/Makefile.awk 1
- X aux/Makefile.sh 5
- X aux/README.man 4
- X aux/patches.sh 3
- X c_incl 1
- X c_incl/cache.c 6
- X c_incl/cache.h 1
- X c_incl/lang_c.c 3
- X c_incl/lang_roff.c 3
- X c_incl/main.c 6
- X c_incl/os.c 2
- X c_incl/os.h 1
- X c_incl/sniff.c 6
- X c_incl/sniff.h 2
- X common 1
- X common/ansi.c 2
- X common/arglex.c 6
- X common/arglex.h 2
- X common/error.c 5
- X common/error.h 2
- X common/help.c 3
- X common/help.h 1
- X common/main.h 1
- X common/mem.c 3
- X common/mem.h 1
- X common/patchlevel.h 1
- X common/s-v-arg.h 2
- X common/str.c 8
- X common/str.h 2
- X common/trace.c 4
- X common/trace.h 3
- X common/version.c 7
- X common/version.h 1
- X common/word.c 4
- X common/word.h 2
- X conf 1
- X conf/ConvexOS-10 2
- X conf/SunOS-4.1.2 2
- X conf/SunOS-4.1.3 2
- X conf/SysV-4.0 2
- X conf/ULTRIX-4.2 2
- X conf/dcosx 3
- X conf/dgux-5.4.1 2
- X config 6
- X cook 1
- X cook/builtin.c 11
- X cook/builtin.h 1
- X cook/cook.c 10
- X cook/cook.h 3
- X cook/env.c 3
- X cook/env.h 1
- X cook/expr.c 6
- X cook/expr.h 2
- X cook/glob.c 5
- X cook/glob.h 1
- X cook/hashline.h 1
- X cook/hashline.y 6
- X cook/id.c 7
- X cook/id.h 2
- X cook/lex.c 9
- X cook/lex.h 2
- X cook/listing.c 3
- X cook/listing.h 1
- X cook/main.c 8
- X cook/match.c 7
- X cook/match.h 2
- X cook/option.c 4
- X cook/option.h 3
- X cook/os.c 9
- X cook/os.h 2
- X cook/parse.h 1
- X cook/parse.y 5
- X cook/stmt.c 7
- X cook/stmt.h 3
- X cooktime 1
- X cooktime/date.h 1
- X cooktime/date.y 9
- X cooktime/main.c 4
- X doc 1
- X doc/builtin 5
- X doc/cmdline 4
- X doc/conditions 2
- X doc/glossary 3
- X doc/history 2
- X doc/how 4
- X doc/intro 2
- X doc/intro.aa 3
- X doc/intro.bb 4
- X doc/language 8
- X doc/match 3
- X doc/option 3
- X doc/refman.t 2
- X doc/system 5
- X doc/variables 2
- X doc/version.so 1
- X find_libs 1
- X find_libs/main.c 4
- X find_libs/os.c 2
- X find_libs/os.h 1
- X h 1
- X h/float.h 1
- X h/limits.h 1
- X h/stdarg.h-min 1
- X h/stddef.h 1
- X h/stdlib.h 1
- X h/string.h 1
- X h/time.h 1
- X lib 1
- X lib/as 1
- X lib/bison 2
- X lib/c 3
- X lib/gcc 1
- X lib/home 1
- X lib/lex 2
- X lib/library 3
- X lib/print 1
- X lib/program 3
- X lib/sccs 1
- X lib/text 1
- X lib/usr 1
- X lib/usr.local 1
- X lib/yacc 3
- X lib/yacc_many 3
- X man1 1
- X man1/c_incl.1 3
- X man1/cook.1 4
- X man1/cooktime.1 3
- X man1/copyright.so 2
- X man1/find_libs.1 2
- X man1/install.sh 1
- X man1/o__rules.so 2
- X man1/roffpp.1 3
- X roffpp 1
- X roffpp/main.c 4
- X roffpp/preprocess.c 5
- X roffpp/preprocess.h 1
- X test 1
- X test/00 1
- X test/00/t0001a.sh 1
- X test/00/t0002a.sh 2
- X test/00/t0003a.sh 1
- X test/00/t0004a.sh 1
- X test/00/t0005a.sh 2
- X test/00/t0006a.sh 1
- X test/00/t0007a.sh 2
- X test/00/t0008a.sh 1
- X test/00/t0009a.sh 2
- X test/00/t0010a.sh 1
- X test/00/t0011a.sh 1
- X test/00/t0012a.sh 1
- X test/00/t0013a.sh 1
- X test/00/t0014a.sh 1
- X test/00/t0015a.sh 2
- X test/00/t0016a.sh 1
- X test/00/t0017a.sh 1
- X test/00/t0018a.sh 2
- X test/00/t0019a.sh 1
- X test/00/t0020a.sh 1
- X test/00/t0021a.sh 1
- X test/00/t0022a.sh 1
- X test/00/t0023a.sh 1
- X test/00/t0024a.sh 2
- X test/00/t0025a.sh 1
- X test/00/t0026a.sh 1
- X test/00/t0027a.sh 2
- X test/00/t0028a.sh 1
- X test/00/t0029a.sh 1
- X test/00/t0030a.sh 2
- X test/00/t0031a.sh 2
- X test/00/t0032a.sh 2
- X test/00/t0033a.sh 1
- X test/00/t0034a.sh 2
- X test/00/t0035a.sh 1
- X test/00/t0036a.sh 1
- X test/00/t0037a.sh 2
- X test/00/t0038a.sh 3
- X test/00/t0039a.sh 2
- X test/00/t0040a.sh 2
- X test/00/t0041a.sh 3
- END_OF_FILE
- if test 5986 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(6506 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X
- X
- X
- Xreadme(cook) readme(cook)
- X
- X
- XNAME
- X cook - a file construction tool
- X
- XDESCRIPTION
- X Put simply, the cook program is yet another make-oid.
- X
- X The cook program is a tool for constructing files. It is
- X given a set of files to create, and recipes of how to
- X create them. In any non-trivial program there will be
- X prerequisites to performing the actions necessary to
- X creating any file, such as include files. The cook
- X program provides a mechanism to define these.
- X
- X When a program is being developed or maintained, the
- X programmer will typically change one file of several which
- X comprise the program. The cook program examines the last-
- X modified times of the files to see when the prerequisites
- X of a file have changed, implying that the file needs to be
- X recreated as it is logically out of date.
- X
- X The cook program also provides a facility for implicit
- X recipes, allowing users to specify how to form a file with
- X a given suffix from a file with a different suffix. For
- X example, to create filename.o from filename.c
- X
- XHISTORY
- X The cook program was originally developed (starting in
- X 1988) because I was marooned on an operating system
- X without anything even vaguely resembling make(1). Since I
- X had to write my own, I added a few improvements. When I
- X finally escaped back to UNIX, it took only two days to
- X port cook to SystemV. I have since deleted all code for
- X that original operating system, although clues to its
- X identity are still present. There is no prize for
- X guessing what it was.
- X
- X After I had cook up on UNIX, the progress the world had
- X made caught up with me. It was gratifying that many of
- X the features other make-oid authors had thought necessary
- X were either already present, or easily and seamlessly
- X added.
- X
- XARCHIVE SITE
- X The latest version of cook is available by anonymous ftp
- X from:
- X Host: ftp.cse.nau.edu (134.114.64.70)
- X Dir: /pub/Aegis
- X File: README # what is in this directory
- X File: cook.1.4.tar.Z # the complete source
- X File: cook.1.4.patch.Z # patch to take 1.3 to 1.4
- X File: cook.1.4.ps.Z # PostScript of the Manual
- X
- X To use anonymous ftp, give "anonymous" as the user name
- X (omit the quotes) and your email address as the password.
- X
- X
- X
- X 1
- X
- X
- X
- X
- X
- Xreadme(cook) readme(cook)
- X
- X
- X My grateful thanks to Paul Balyoz <pab@ftp.cse.nau.edu>
- X for his generosity in providing this archive space.
- X
- X This directory also contains a few other pieces of
- X software written by me. Please have a look if you are
- X interested.
- X
- X For those of you without ftp, I recommend the use of an
- X ftp-by-email server. Here is a list of a few (there are
- X many more):
- X mail-server@pit-manager.mit.edu
- X ftpmail@decwrl.dec.com
- X ftpmail@cs.uow.edu.au
- X
- X In general, you can get a help message about how to use
- X each system by sending email with a subject of "help" and
- X a message body containing just the word "help".
- X
- XMAILING LIST
- X A mailing list has been created so that users of cook may
- X exchange ideas about how to use the cook program.
- X Discussion may include, but is not limited to: bugs,
- X enhancements, and applications. The list is not
- X moderated.
- X
- X The address of the mailing list is
- X cook-users@bmr.gov.au
- X
- X To subscribe to this mailing list, send an email message
- X to majordomo@bmr.gov.au with a message body containing the
- X single line
- X subscribe cook-users
- X Please note that bmr.gov.au is an Internet site, so if you
- X have an address which is not readily derived from your
- X mail headers (majordomo is only a Perl program, after all)
- X you will need to use a message of the form:
- X subscribe cook-users address
- X where address is an email address which makes sense from
- X an Internet site.
- X
- X The software which handles this mailing list CANNOT send
- X you a copy of the cook program. Please use ftp or ftp-by-
- X email, instead.
- X
- XNEW IN THIS RELEASE
- X A number of features have been added to cook with this
- X release. A few of them are detailed here:
- X
- X * The cook program is now known to work on more systems.
- X Most changes were aimed at improving portability, or
- X avoiding problems specific to some systems.
- X
- X * The GNU long option name convention is now understood.
- X Option names for cook were always long, so this mostly
- X
- X
- X
- X 2
- X
- X
- X
- X
- X
- Xreadme(cook) readme(cook)
- X
- X
- X consists of ignoring the extra leading '-'. The
- X "--foo=bar" convention is also understood for options with
- X arguments.
- X
- X * Tests which fail now tell you what it was they were
- X testing for. This will give the user some idea of what is
- X happening.
- X
- X Plus the usual crop of bug fixes and tinkering. For
- X excruciating detail, and also acknowlegements of those who
- X generously sent me feedback, please see the CHANGES file
- X included in this distribution.
- X
- XBUILDING COOK
- X Full instructions for building the cook program may be
- X found in the BUILDING file included in this distribution.
- X
- XCOPYRIGHT
- X cook version 1.4.D013
- X Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Peter
- X Miller.
- X All rights reserved.
- X
- X This program is free software; you can redistribute it
- X and/or modify it under the terms of the GNU General Public
- X License as published by the Free Software Foundation;
- X either version 2 of the License, or (at your option) any
- X later version.
- X
- X This program is distributed in the hope that it will be
- X useful, but WITHOUT ANY WARRANTY; without even the implied
- X warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- X PURPOSE. See the GNU General Public License for more
- X details.
- X
- X You should have received a copy of the GNU General Public
- X License along with this program; if not, write to the Free
- X Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
- X 02139, USA.
- X
- X It should be in the LICENSE file included with this
- X distribution.
- X
- XAUTHOR
- X Peter Miller UUCP uunet!munnari!bmr.gov.au!pmiller
- X /\/\* Internet pmiller@bmr.gov.au
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X 3
- X
- X
- END_OF_FILE
- if test 6506 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test ! -d 'aux' ; then
- echo shar: Creating directory \"'aux'\"
- mkdir 'aux'
- fi
- if test -f 'aux/CHANGES.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'aux/CHANGES.sh'\"
- else
- echo shar: Extracting \"'aux/CHANGES.sh'\" \(1184 characters\)
- sed "s/^X//" >'aux/CHANGES.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: shell script to generate CHANGES file
- X#
- Xcase $# in
- X1)
- X project=$1
- X ;;
- X
- X*)
- X echo "usage: $0 <project>" 1>&2
- X exit 1
- X ;;
- Xesac
- Xset -e
- Xaegis -l changes -p $project -v -pl 66 -pw 72 < /dev/null
- Xchanges=`aegis -list changes -terse -project $project`
- Xfor n in $changes
- Xdo
- X echo '' | tr '\12' '\14'
- X aegis -l change_details -p $project -c $n -v -pl 66 -pw 72 < /dev/null
- Xdone
- Xexit 0
- END_OF_FILE
- if test 1184 -ne `wc -c <'aux/CHANGES.sh'`; then
- echo shar: \"'aux/CHANGES.sh'\" unpacked with wrong size!
- fi
- # end of 'aux/CHANGES.sh'
- fi
- if test -f 'aux/Makefile.awk' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'aux/Makefile.awk'\"
- else
- echo shar: Extracting \"'aux/Makefile.awk'\" \(1122 characters\)
- sed "s/^X//" >'aux/Makefile.awk' <<'END_OF_FILE'
- X#
- X# cook - a program construction tool
- X# Copyright (C) 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: helper file for generating Makefile file
- X#
- Xlength <= 72
- Xlength > 72 {
- X if (substr($0, 1, 1) == "\t")
- X {
- X printf "\t"
- X pos = 8
- X }
- X else
- X pos = 0
- X for (j = 1; j <= NF; ++j)
- X {
- X if (pos + 1 + length($j) > 72)
- X {
- X printf "\\\n\t\t"
- X pos = 16
- X }
- X printf "%s ", $j
- X pos += length($j) + 1
- X }
- X printf "\n"
- X}
- END_OF_FILE
- if test 1122 -ne `wc -c <'aux/Makefile.awk'`; then
- echo shar: \"'aux/Makefile.awk'\" unpacked with wrong size!
- fi
- # end of 'aux/Makefile.awk'
- fi
- if test ! -d 'c_incl' ; then
- echo shar: Creating directory \"'c_incl'\"
- mkdir 'c_incl'
- fi
- if test -f 'c_incl/cache.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'c_incl/cache.h'\"
- else
- echo shar: Extracting \"'c_incl/cache.h'\" \(1313 characters\)
- sed "s/^X//" >'c_incl/cache.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for c_incl/cache.c
- X */
- X
- X#ifndef CACHE_H
- X#define CACHE_H
- X
- X#include <sys/types.h>
- X#include <sys/stat.h>
- X
- X#include <main.h>
- X#include <str.h>
- X#include <word.h>
- X
- Xtypedef struct cache_ty cache_ty;
- Xstruct cache_ty
- X{
- X string_ty *filename;
- X struct stat st;
- X wlist ingredients;
- X};
- X
- Xvoid cache_initialize _((void));
- Xcache_ty *cache_search _((string_ty *filename));
- Xvoid cache_read _((void));
- Xvoid cache_write _((void));
- Xvoid cache_update_notify _((void));
- X
- X#endif /* CACHE_H */
- END_OF_FILE
- if test 1313 -ne `wc -c <'c_incl/cache.h'`; then
- echo shar: \"'c_incl/cache.h'\" unpacked with wrong size!
- fi
- # end of 'c_incl/cache.h'
- fi
- if test -f 'c_incl/os.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'c_incl/os.h'\"
- else
- echo shar: Extracting \"'c_incl/os.h'\" \(964 characters\)
- sed "s/^X//" >'c_incl/os.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for c_incl/os.c
- X */
- X
- X#ifndef OS_H
- X#define OS_H
- X
- X#include <main.h>
- X
- Xint os_exists _((char *));
- X
- X#endif /* OS_H */
- END_OF_FILE
- if test 964 -ne `wc -c <'c_incl/os.h'`; then
- echo shar: \"'c_incl/os.h'\" unpacked with wrong size!
- fi
- # end of 'c_incl/os.h'
- fi
- if test ! -d 'common' ; then
- echo shar: Creating directory \"'common'\"
- mkdir 'common'
- fi
- if test -f 'common/help.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'common/help.h'\"
- else
- echo shar: Extracting \"'common/help.h'\" \(1037 characters\)
- sed "s/^X//" >'common/help.h' <<'END_OF_FILE'
- X/*
- X * cook - a program construction tool
- X * Copyright (C) 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for comon/help.c
- X */
- X
- X#ifndef HELP_H
- X#define HELP_H
- X
- X#include <main.h>
- X
- Xvoid help _((char **text, int text_lem, void (*usage)(void)));
- Xchar *version_stamp _((void));
- X
- X#endif /* HELP_H */
- END_OF_FILE
- if test 1037 -ne `wc -c <'common/help.h'`; then
- echo shar: \"'common/help.h'\" unpacked with wrong size!
- fi
- # end of 'common/help.h'
- fi
- if test -f 'common/main.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'common/main.h'\"
- else
- echo shar: Extracting \"'common/main.h'\" \(1161 characters\)
- sed "s/^X//" >'common/main.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: common defined, including DEBUG define
- X */
- X
- X#ifndef MAIN_H
- X#define MAIN_H
- X
- X#ifdef __STDC__
- X# define _(x) x
- X#else
- X# define _(x) ()
- X# define const
- X#endif
- X
- X#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
- X#define ENDOF(a) ((a) + SIZEOF(a))
- X
- X/*
- X * take the following out of comments to enable debugging
- X *
- X#define DEBUG
- X */
- X
- X#endif /* MAIN_H */
- END_OF_FILE
- if test 1161 -ne `wc -c <'common/main.h'`; then
- echo shar: \"'common/main.h'\" unpacked with wrong size!
- fi
- # end of 'common/main.h'
- fi
- if test -f 'common/mem.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'common/mem.h'\"
- else
- echo shar: Extracting \"'common/mem.h'\" \(1135 characters\)
- sed "s/^X//" >'common/mem.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for common/mem.c
- X */
- X
- X#ifndef MEM_H
- X#define MEM_H
- X
- X#include <stddef.h>
- X#include <main.h>
- X
- Xchar *enlarge _((size_t *, char **, size_t));
- Xchar *mem_alloc _((size_t));
- Xchar *mem_alloc_clear _((size_t));
- Xvoid mem_change_size _((char **, size_t));
- Xvoid mem_free _((char *));
- X
- X#endif /* MEM_H */
- END_OF_FILE
- if test 1135 -ne `wc -c <'common/mem.h'`; then
- echo shar: \"'common/mem.h'\" unpacked with wrong size!
- fi
- # end of 'common/mem.h'
- fi
- if test -f 'common/patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'common/patchlevel.h'\"
- else
- echo shar: Extracting \"'common/patchlevel.h'\" \(30 characters\)
- sed "s/^X//" >'common/patchlevel.h' <<'END_OF_FILE'
- X#define PATCHLEVEL "1.4.D013"
- END_OF_FILE
- if test 30 -ne `wc -c <'common/patchlevel.h'`; then
- echo shar: \"'common/patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'common/patchlevel.h'
- fi
- if test -f 'common/version.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'common/version.h'\"
- else
- echo shar: Extracting \"'common/version.h'\" \(981 characters\)
- sed "s/^X//" >'common/version.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for common/version.c
- X */
- X
- X#ifndef VERSION_H
- X#define VERSION_H
- X
- X#include <main.h>
- X
- Xvoid version _((void));
- X
- X#endif /* VERSION_H */
- END_OF_FILE
- if test 981 -ne `wc -c <'common/version.h'`; then
- echo shar: \"'common/version.h'\" unpacked with wrong size!
- fi
- # end of 'common/version.h'
- fi
- if test ! -d 'conf' ; then
- echo shar: Creating directory \"'conf'\"
- mkdir 'conf'
- fi
- if test ! -d 'cook' ; then
- echo shar: Creating directory \"'cook'\"
- mkdir 'cook'
- fi
- if test -f 'cook/builtin.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cook/builtin.h'\"
- else
- echo shar: Extracting \"'cook/builtin.h'\" \(997 characters\)
- sed "s/^X//" >'cook/builtin.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for cook/builtin.c
- X */
- X
- X#ifndef BUILTIN_H
- X#define BUILTIN_H
- X
- X#include <main.h>
- X
- Xextern void builtin_initialize _((void));
- X
- X#endif /* BUILTIN_H */
- END_OF_FILE
- if test 997 -ne `wc -c <'cook/builtin.h'`; then
- echo shar: \"'cook/builtin.h'\" unpacked with wrong size!
- fi
- # end of 'cook/builtin.h'
- fi
- if test -f 'cook/env.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cook/env.h'\"
- else
- echo shar: Extracting \"'cook/env.h'\" \(1045 characters\)
- sed "s/^X//" >'cook/env.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for cook/env.c
- X */
- X
- X#ifndef ENV_H
- X#define ENV_H
- X
- X#include <main.h>
- X
- Xvoid env_initialize _((void));
- Xvoid env_set _((char *name, char *value));
- Xvoid env_unset _((char *name));
- X
- X#endif /* ENV_H */
- END_OF_FILE
- if test 1045 -ne `wc -c <'cook/env.h'`; then
- echo shar: \"'cook/env.h'\" unpacked with wrong size!
- fi
- # end of 'cook/env.h'
- fi
- if test -f 'cook/glob.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cook/glob.h'\"
- else
- echo shar: Extracting \"'cook/glob.h'\" \(993 characters\)
- sed "s/^X//" >'cook/glob.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for cook/glob.c
- X */
- X
- X#ifndef GLOB_H
- X#define GLOB_H
- X
- X#include <main.h>
- X#include <word.h>
- X
- Xint glob _((wlist *, wlist *));
- X
- X#endif /* GLOB_H */
- END_OF_FILE
- if test 993 -ne `wc -c <'cook/glob.h'`; then
- echo shar: \"'cook/glob.h'\" unpacked with wrong size!
- fi
- # end of 'cook/glob.h'
- fi
- if test -f 'cook/hashline.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cook/hashline.h'\"
- else
- echo shar: Extracting \"'cook/hashline.h'\" \(972 characters\)
- sed "s/^X//" >'cook/hashline.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for cook/hashline.y
- X */
- X
- X#ifndef HASHLINE_H
- X#define HASHLINE_H
- X
- X#include <main.h>
- X
- Xvoid hashline _((void));
- X
- X#endif /* HASHLINE_H */
- END_OF_FILE
- if test 972 -ne `wc -c <'cook/hashline.h'`; then
- echo shar: \"'cook/hashline.h'\" unpacked with wrong size!
- fi
- # end of 'cook/hashline.h'
- fi
- if test -f 'cook/listing.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cook/listing.h'\"
- else
- echo shar: Extracting \"'cook/listing.h'\" \(964 characters\)
- sed "s/^X//" >'cook/listing.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for cook/listing.c
- X */
- X
- X#ifndef LISTING_H
- X#define LISTING_H
- X
- X#include <main.h>
- X
- Xvoid log_open _((void));
- X
- X#endif
- END_OF_FILE
- if test 964 -ne `wc -c <'cook/listing.h'`; then
- echo shar: \"'cook/listing.h'\" unpacked with wrong size!
- fi
- # end of 'cook/listing.h'
- fi
- if test -f 'cook/parse.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cook/parse.h'\"
- else
- echo shar: Extracting \"'cook/parse.h'\" \(1023 characters\)
- sed "s/^X//" >'cook/parse.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for cook/parse.y
- X */
- X
- X#ifndef PARSE_H
- X#define PARSE_H
- X
- X#include <main.h>
- X
- Xstruct string_ty;
- X
- Xvoid parse _((struct string_ty *));
- Xvoid parse_initialize _((void));
- X
- X#endif /* PARSE_H */
- END_OF_FILE
- if test 1023 -ne `wc -c <'cook/parse.h'`; then
- echo shar: \"'cook/parse.h'\" unpacked with wrong size!
- fi
- # end of 'cook/parse.h'
- fi
- if test ! -d 'cooktime' ; then
- echo shar: Creating directory \"'cooktime'\"
- mkdir 'cooktime'
- fi
- if test -f 'cooktime/date.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cooktime/date.h'\"
- else
- echo shar: Extracting \"'cooktime/date.h'\" \(1014 characters\)
- sed "s/^X//" >'cooktime/date.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for cooktime/date.y
- X */
- X
- X#ifndef DATE_H
- X#define DATE_H
- X
- X#include <time.h>
- X#include <main.h>
- X
- Xtime_t date_scan _((char *));
- Xchar *date_string _((time_t));
- X
- X#endif /* DATE_H */
- END_OF_FILE
- if test 1014 -ne `wc -c <'cooktime/date.h'`; then
- echo shar: \"'cooktime/date.h'\" unpacked with wrong size!
- fi
- # end of 'cooktime/date.h'
- fi
- if test ! -d 'doc' ; then
- echo shar: Creating directory \"'doc'\"
- mkdir 'doc'
- fi
- if test -f 'doc/version.so' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/version.so'\"
- else
- echo shar: Extracting \"'doc/version.so'\" \(9 characters\)
- sed "s/^X//" >'doc/version.so' <<'END_OF_FILE'
- X1.4.D013
- END_OF_FILE
- if test 9 -ne `wc -c <'doc/version.so'`; then
- echo shar: \"'doc/version.so'\" unpacked with wrong size!
- fi
- # end of 'doc/version.so'
- fi
- if test ! -d 'find_libs' ; then
- echo shar: Creating directory \"'find_libs'\"
- mkdir 'find_libs'
- fi
- if test -f 'find_libs/os.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'find_libs/os.h'\"
- else
- echo shar: Extracting \"'find_libs/os.h'\" \(967 characters\)
- sed "s/^X//" >'find_libs/os.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for find_libs/os.c
- X */
- X
- X#ifndef OS_H
- X#define OS_H
- X
- X#include <main.h>
- X
- Xint os_exists _((char *));
- X
- X#endif /* OS_H */
- END_OF_FILE
- if test 967 -ne `wc -c <'find_libs/os.h'`; then
- echo shar: \"'find_libs/os.h'\" unpacked with wrong size!
- fi
- # end of 'find_libs/os.h'
- fi
- if test ! -d 'h' ; then
- echo shar: Creating directory \"'h'\"
- mkdir 'h'
- fi
- if test -f 'h/float.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'h/float.h'\"
- else
- echo shar: Extracting \"'h/float.h'\" \(763 characters\)
- sed "s/^X//" >'h/float.h' <<'END_OF_FILE'
- X
- X/*
- X * this version of float.h works for IEEE float (32bits) and double (64bits)
- X *
- X * MANIFEST: minimal float.h replacement
- X */
- X
- X#ifndef _H_float
- X#define _H_float
- X
- X#define FLT_RADIX 2
- X#define FLT_MANT_DIG 24
- X#define FLT_DIG 6
- X#define FLT_ROUNDS 1
- X#define FLT_EPSILON ((float)1.19209290e-07)
- X#define FLT_MIN_EXP (-125)
- X#define FLT_MIN ((float)1.17549435e-38)
- X#define FLT_MIN_10_EXP (-37)
- X#define FLT_MAX_EXP 128
- X#define FLT_MAX ((float)3.40282347e+38)
- X#define FLT_MAX_10_EXP 38
- X#define DBL_MANT_DIG 53
- X#define DBL_DIG 15
- X#define DBL_EPSILON 2.2204460492503131e-16
- X#define DBL_MIN_EXP (-1021)
- X#define DBL_MIN 2.2250738585072014e-308
- X#define DBL_MIN_10_EXP (-307)
- X#define DBL_MAX_EXP 1024
- X#define DBL_MAX 1.7976931348623157e+308
- X#define DBL_MAX_10_EXP 308
- X
- X#endif
- END_OF_FILE
- if test 763 -ne `wc -c <'h/float.h'`; then
- echo shar: \"'h/float.h'\" unpacked with wrong size!
- fi
- # end of 'h/float.h'
- fi
- if test -f 'h/limits.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'h/limits.h'\"
- else
- echo shar: Extracting \"'h/limits.h'\" \(982 characters\)
- sed "s/^X//" >'h/limits.h' <<'END_OF_FILE'
- X
- X/*
- X * ANSI C definitions
- X *
- X * these definitions work for char:8, short:16, int:32, long:32,
- X *
- X * MANIFEST: minimal limits.h replacement
- X */
- X
- X#ifndef _H_limits
- X#define _H_limits
- X
- X#define CHAR_BIT 8
- X#define CHAR_MAX 127
- X#define CHAR_MIN (-128)
- X#define SCHAR_MAX 127
- X#define SCHAR_MIN (-128)
- X#define UCHAR_MAX 255
- X#define SHRT_MIN (-32768)
- X#define SHRT_MAX 32767
- X#define USHRT_MAX 65535
- X#define LONG_MAX 2147483647
- X#define LONG_MIN (-2147483648)
- X#define ULONG_MAX 4294967295
- X
- X#define INT_MAX LONG_MAX
- X#define INT_MIN LONG_MIN
- X#define UINT_MAX ULONG_MAX
- X
- X/*
- X * POSIX definitions
- X */
- X
- X#if defined(sun) || defined(BSD)
- X
- X/*
- X * these definitions work for BSD and SunOS
- X */
- X#define NAME_MAX 255
- X#define PATH_MAX 1023
- X
- X#else
- X
- X/*
- X * These definitions work for SystemV
- X * note that 5.2 and 5.3 state in the release notes that 1024 is correct,
- X * even though the distributed limits.h has 256 in it.
- X */
- X#define NAME_MAX 14
- X#define PATH_MAX 1024
- X
- X#endif
- X
- X#endif /* _H_limits */
- END_OF_FILE
- if test 982 -ne `wc -c <'h/limits.h'`; then
- echo shar: \"'h/limits.h'\" unpacked with wrong size!
- fi
- # end of 'h/limits.h'
- fi
- if test -f 'h/stdarg.h-min' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'h/stdarg.h-min'\"
- else
- echo shar: Extracting \"'h/stdarg.h-min'\" \(578 characters\)
- sed "s/^X//" >'h/stdarg.h-min' <<'END_OF_FILE'
- X/*
- X * This stadrg.h works for simple machines, such as 68K or 386.
- X * It assumes the stack grows downwards, and that no arguments are
- X * stored in registers.
- X *
- X * This stdarg.h does not work for Sun sparc or MIPS,
- X * and probably not any other RISC machine, either.
- X *
- X * MANIFEST: minimal stdarg.h replacement
- X */
- X
- X#ifndef _STDARG_H
- X#define _STDARG_H
- X
- Xtypedef char *va_list;
- X#define va_start(ap,parmn) (void)((ap) = (char*)(&(parmn) + 1))
- X#define va_end(ap) (void)((ap) = 0)
- X#define va_arg(ap, type) \
- X (((type*)((ap) = ((ap) + sizeof(type))))[-1])
- X
- X#endif /* _STDARG_H */
- END_OF_FILE
- if test 578 -ne `wc -c <'h/stdarg.h-min'`; then
- echo shar: \"'h/stdarg.h-min'\" unpacked with wrong size!
- fi
- # end of 'h/stdarg.h-min'
- fi
- if test -f 'h/stddef.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'h/stddef.h'\"
- else
- echo shar: Extracting \"'h/stddef.h'\" \(601 characters\)
- sed "s/^X//" >'h/stddef.h' <<'END_OF_FILE'
- X
- X/*
- X * cook - a program construction tool
- X * ansi standard include file
- X *
- X * This include file is only for use on systems which do not have
- X * and ANSI C standard conforming compiler.
- X *
- X * Note that this faile must be included AFTER <sys/types.h>.
- X *
- X * MANIFEST: minimal stddef.h replacement
- X */
- X
- X#ifndef _H_stddef
- X#define _H_stddef
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X#ifndef offsetof
- X#define offsetof(type, identifier) ((char*)&((type*)0)->identifier - (char*)0)
- X#endif
- X
- Xtypedef long ptrdiff_t;
- X
- X#ifndef _SIZE_T
- X#define _SIZE_T
- Xtypedef unsigned long size_t;
- X#endif
- X
- X#endif /* _H_stddef */
- END_OF_FILE
- if test 601 -ne `wc -c <'h/stddef.h'`; then
- echo shar: \"'h/stddef.h'\" unpacked with wrong size!
- fi
- # end of 'h/stddef.h'
- fi
- if test -f 'h/stdlib.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'h/stdlib.h'\"
- else
- echo shar: Extracting \"'h/stdlib.h'\" \(588 characters\)
- sed "s/^X//" >'h/stdlib.h' <<'END_OF_FILE'
- X/*
- X * MANIFEST: minimum stdlib.h replacement
- X */
- X
- X#ifndef _H_stdlib
- X#define _H_stdlib
- X
- Xtypedef struct div_t div_t;
- Xstruct div_t
- X{
- X int quot;
- X int rem;
- X};
- X
- Xtypedef struct ldiv_t ldiv_t;
- Xstruct ldiv_t
- X{
- X long quot;
- X long rem;
- X};
- X
- Xdouble atof();
- Xint atoi();
- Xlong atol();
- Xdouble strtod();
- Xunsigned long strtoul();
- Xint rand();
- Xvoid srand();
- Xvoid *calloc();
- Xvoid free();
- Xvoid *malloc();
- Xvoid *realloc();
- Xvoid abort();
- Xint atexit();
- Xvoid exit();
- Xchar *getenv();
- Xint system();
- Xvoid *bsearch();
- Xvoid qsort();
- Xint abs();
- Xdiv_t div();
- Xlong labs();
- Xldiv_t ldiv();
- X
- X#endif /* _H_stdlib */
- END_OF_FILE
- if test 588 -ne `wc -c <'h/stdlib.h'`; then
- echo shar: \"'h/stdlib.h'\" unpacked with wrong size!
- fi
- # end of 'h/stdlib.h'
- fi
- if test -f 'h/string.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'h/string.h'\"
- else
- echo shar: Extracting \"'h/string.h'\" \(454 characters\)
- sed "s/^X//" >'h/string.h' <<'END_OF_FILE'
- X/*
- X * MANIFEST: minimal string.h replacement
- X */
- X
- X#ifndef _H_string
- X#define _H_string
- X
- Xvoid *memcpy();
- Xvoid *memmove();
- Xchar *strcpy();
- Xchar *strncpy();
- Xchar *strcat();
- Xchar *strncat();
- Xint memcmp();
- Xint strcmp();
- Xint strcoll();
- Xint strncmp();
- Xsize_t strxfrm();
- Xvoid *memchr();
- Xchar *strchr();
- Xsize_t strcspn();
- Xchar *strpbrk();
- Xchar *strrchr();
- Xsize_t strspn();
- Xchar *strstr();
- Xchar *strtok();
- Xvoid *memset();
- Xchar *strerror();
- Xsize_t strlen();
- X
- X#endif
- END_OF_FILE
- if test 454 -ne `wc -c <'h/string.h'`; then
- echo shar: \"'h/string.h'\" unpacked with wrong size!
- fi
- # end of 'h/string.h'
- fi
- if test -f 'h/time.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'h/time.h'\"
- else
- echo shar: Extracting \"'h/time.h'\" \(257 characters\)
- sed "s/^X//" >'h/time.h' <<'END_OF_FILE'
- X/*
- X * MANIFEST: minimal time.h suplement
- X */
- X
- X#ifndef _H_time
- X#define _H_time
- X
- X#include "/usr/include/time.h"
- X
- X#ifndef _TIME_T
- X#define _TIME_T
- Xtypedef long time_t;
- X#endif
- X
- X#ifndef _CLOCK_T
- X#define _CLOCK_T
- Xtypedef long clock_t;
- X#endif
- X
- X#endif /* _H_time */
- END_OF_FILE
- if test 257 -ne `wc -c <'h/time.h'`; then
- echo shar: \"'h/time.h'\" unpacked with wrong size!
- fi
- # end of 'h/time.h'
- fi
- if test ! -d 'lib' ; then
- echo shar: Creating directory \"'lib'\"
- mkdir 'lib'
- fi
- if test -f 'lib/as' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/as'\"
- else
- echo shar: Extracting \"'lib/as'\" \(1238 characters\)
- sed "s/^X//" >'lib/as' <<'END_OF_FILE'
- X/*
- X * NAME
- X * as - assembler cookbook
- X *
- X * DESCRIPTION
- X * This cookbook defines how to use the assembler
- X *
- X * RECIPES
- X * %.o: %.s construct object friles from assembler source files
- X *
- X * VARIABLES
- X * as The assembler command.
- X * Not altered if already defined.
- X * as_flags Options to pass the assembler command.
- X * Not altered if already defined.
- X * The default is empty.
- X * as_src Assembler source files in the current directory.
- X * dot_src Source files constructable in the current directory
- X * (unioned with existing setting, if necessary).
- X * dot_obj Object files constructable in the current directory
- X * (unioned with existing setting, if necessary).
- X * dot_clean Files which may be removed from the current directory
- X * in a clean target.
- X *
- X * MANIFEST: cookbook for using assembler
- X */
- X
- X#pragma once
- X
- Xif [not [defined as]] then
- X as = as;
- Xif [not [defined as_flags]] then
- X as_flags = ;
- Xif [not [defined dot_src]] then
- X dot_src = ;
- Xif [not [defined dot_obj]] then
- X dot_obj = ;
- Xas_src = [glob *.s];
- Xdot_src = [stringset [dot_src] [as_src]];
- Xdot_obj = [stringset [dot_obj] [fromto %.s %.o [as_src]]];
- Xdot_clean = [stringset [dot_clean] [dot_obj]];
- X
- X%.o: %.s
- X {
- X [as] [as_flags] -o %.o %.s;
- X }
- END_OF_FILE
- if test 1238 -ne `wc -c <'lib/as'`; then
- echo shar: \"'lib/as'\" unpacked with wrong size!
- fi
- # end of 'lib/as'
- fi
- if test -f 'lib/gcc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/gcc'\"
- else
- echo shar: Extracting \"'lib/gcc'\" \(196 characters\)
- sed "s/^X//" >'lib/gcc' <<'END_OF_FILE'
- X/*
- X * MANIFEST: cookbook for using gcc
- X */
- X#pragma once
- X#include "c"
- Xgcc_include_dir = /usr/local/lib/gcc-include;
- Xcc = gcc;
- Xcc_include_flags = [stringset -I[gcc_include_dir] [cc_include_flags]];
- END_OF_FILE
- if test 196 -ne `wc -c <'lib/gcc'`; then
- echo shar: \"'lib/gcc'\" unpacked with wrong size!
- fi
- # end of 'lib/gcc'
- fi
- if test -f 'lib/home' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/home'\"
- else
- echo shar: Extracting \"'lib/home'\" \(922 characters\)
- sed "s/^X//" >'lib/home' <<'END_OF_FILE'
- X/*
- X * NAME
- X * home - define installation locations
- X *
- X * DESCRIPTION
- X * This cookbook defined where certain directoris are,
- X * and some common uses of those directories,
- X * relative to $HOME.
- X *
- X * VARIABLES
- X * home users' home directory.
- X * bin directory to place program binaries into
- X * include directory to place include files into
- X * lib directory to place libraries into
- X * cc_include_flags The [include] directory is added to the search args
- X * cc_link_flags The [lib] directory is added to the search args
- X *
- X * MANIFEST: cookbook for locations in home directory
- X */
- X
- X#pragma once
- X
- Xhome = [getenv HOME];
- Xbin = [home]/bin;
- Xinclude = [home]/include;
- Xlib = [home]/lib;
- X
- Xif [not [defined cc_include_flags]] then
- X cc_include_flags = ;
- Xcc_include_flags = [stringset [cc_include_flags] -I[include]];
- X
- Xif [not [defined cc_link_flags]] then
- X cc_link_flags = ;
- Xcc_link_flags = [stringset [cc_link_flags] -L[lib]];
- END_OF_FILE
- if test 922 -ne `wc -c <'lib/home'`; then
- echo shar: \"'lib/home'\" unpacked with wrong size!
- fi
- # end of 'lib/home'
- fi
- if test -f 'lib/print' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/print'\"
- else
- echo shar: Extracting \"'lib/print'\" \(676 characters\)
- sed "s/^X//" >'lib/print' <<'END_OF_FILE'
- X/*
- X * NAME
- X * print - print files
- X *
- X * DESCRIPTION
- X * This cookbook is used to print files.
- X * It will almost certainly need to be changed for every site.
- X *
- X * RECIPES
- X * %.lw: %.ps print a PostScript file
- X * %.lp: % print a text file
- X *
- X * VARIABLES
- X * lp The print command.
- X * Not altered if already defined.
- X * lp_flags OPtions passed to the print command.
- X * Not altered if already defined.
- X * Defaults to empty.
- X *
- X * MANIFEST: cookbook for printing files
- X */
- X
- X#pragma once
- X
- Xif [not [defined lp]] then
- X lp = lp;
- Xif [not [defined lp_flags]] then
- X lp_flags = ;
- X
- X%.lw: %.ps
- X {
- X [lp] [lp_flags] -dlaser %.ps;
- X }
- X
- X%.lp: %
- X {
- X [lp] [lp_flags] %;
- X }
- END_OF_FILE
- if test 676 -ne `wc -c <'lib/print'`; then
- echo shar: \"'lib/print'\" unpacked with wrong size!
- fi
- # end of 'lib/print'
- fi
- if test -f 'lib/sccs' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/sccs'\"
- else
- echo shar: Extracting \"'lib/sccs'\" \(399 characters\)
- sed "s/^X//" >'lib/sccs' <<'END_OF_FILE'
- X/*
- X * NAME
- X * sccs - extract files from SCCS
- X *
- X * DESCRIPTION
- X * This cookbook is used to extract files from SCCS
- X *
- X * RECIPES
- X * %: SCCS/s.% extract files from SCCS
- X *
- X * VARIABLES
- X * get the sccs get command
- X *
- X * MANIFEST: cookbook for using SCCS
- X */
- X
- X#pragma once
- X
- Xif [not [defined get]] then
- X get = get;
- X
- X%0%: %0SCCS/s.%
- X if [exists %0SCCS/s.%]
- X {
- X [get] -p %0SCCS/s.% > %0%;
- X }
- END_OF_FILE
- if test 399 -ne `wc -c <'lib/sccs'`; then
- echo shar: \"'lib/sccs'\" unpacked with wrong size!
- fi
- # end of 'lib/sccs'
- fi
- if test -f 'lib/text' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/text'\"
- else
- echo shar: Extracting \"'lib/text'\" \(1177 characters\)
- sed "s/^X//" >'lib/text' <<'END_OF_FILE'
- X/*
- X * NAME
- X * text - process text
- X *
- X * DESCRIPTION
- X * This cookbook is used to process text documents.
- X *
- X * Include file dependencies are automatically detected.
- X * The requirements for various preprocessors are automatically detected
- X * (eg eqn, tbl, pic, graf).
- X *
- X * RECIPES
- X * %.ps: %.t PostScript for generic *roff source
- X * %: %.t straight text from *roff source
- X *
- X * VARIABLES
- X * text_incl The text_incl command (finds include dependencies).
- X * Not altered if already set.
- X * text_roff The text_roff command (finds preprocessor needs).
- X * Not altered if already set.
- X * roff_flags Arguments passed to text_roff,
- X * and indirectly to the *roff program.
- X * Not altered if already set.
- X * Defaults to empty.
- X *
- X * MANIFEST: cookbook for formatting documents
- X */
- X
- X#pragma once
- X
- Xif [not [defined text_incl]] then
- X text_incl = text_incl;
- Xif [not [defined text_roff]] then
- X text_roff = text_roff;
- Xif [not [defined roff_flags]] then
- X roff_flags = ;
- X
- X%.ps: %.t: [collect [text_incl] %.t]
- X {
- X [collect [text_roff] -e [roff_flags] %.t] > %.ps;
- X }
- X
- X%: %.t: [collect [text_incl] %.t]
- X {
- X [collect [text_roff] -n [roff_flags] %.t] > %.doc;
- X }
- END_OF_FILE
- if test 1177 -ne `wc -c <'lib/text'`; then
- echo shar: \"'lib/text'\" unpacked with wrong size!
- fi
- # end of 'lib/text'
- fi
- if test -f 'lib/usr' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/usr'\"
- else
- echo shar: Extracting \"'lib/usr'\" \(437 characters\)
- sed "s/^X//" >'lib/usr' <<'END_OF_FILE'
- X/*
- X * NAME
- X * usr - define installation locations
- X *
- X * DESCRIPTION
- X * This cookbook defined where certain directoris are,
- X * relative to /usr.
- X *
- X * VARIABLES
- X * bin directory to place program binaries into
- X * include directory to place include files into
- X * lib directory to place libraries into
- X *
- X * MANIFEST: cookbook for locations in system directories
- X */
- X
- X#pragma once
- X
- Xbin = /usr/bin;
- Xinclude = /usr/include;
- Xlib = /usr/lib;
- END_OF_FILE
- if test 437 -ne `wc -c <'lib/usr'`; then
- echo shar: \"'lib/usr'\" unpacked with wrong size!
- fi
- # end of 'lib/usr'
- fi
- if test -f 'lib/usr.local' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib/usr.local'\"
- else
- echo shar: Extracting \"'lib/usr.local'\" \(900 characters\)
- sed "s/^X//" >'lib/usr.local' <<'END_OF_FILE'
- X/*
- X * NAME
- X * usr.local - define installation locations
- X *
- X * DESCRIPTION
- X * This cookbook defined where certain directoris are,
- X * and some common uses of those directories,
- X * relative to /usr/local.
- X *
- X * VARIABLES
- X * bin directory to place program binaries into
- X * include directory to place include files into
- X * lib directory to place libraries into
- X * cc_include_flags The [include] directory is added to the search args
- X * cc_link_flags The [lib] directory is added to the search args
- X *
- X * MANIFEST: cookbook for locations in local system directories
- X */
- X
- X#pragma once
- X
- Xbin = /usr/local/bin;
- Xinclude = /usr/local/include;
- Xlib = /usr/local/lib;
- X
- Xif [not [defined cc_include_flags]] then
- X cc_include_flags = ;
- Xcc_include_flags = [stringset [cc_include_flags] -I[include]];
- X
- Xif [not [defined cc_link_flags]] then
- X cc_link_flags = ;
- Xcc_link_flags = [stringset [cc_link_flags] -L[lib]];
- END_OF_FILE
- if test 900 -ne `wc -c <'lib/usr.local'`; then
- echo shar: \"'lib/usr.local'\" unpacked with wrong size!
- fi
- # end of 'lib/usr.local'
- fi
- if test ! -d 'man1' ; then
- echo shar: Creating directory \"'man1'\"
- mkdir 'man1'
- fi
- if test -f 'man1/install.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'man1/install.sh'\"
- else
- echo shar: Extracting \"'man1/install.sh'\" \(1032 characters\)
- sed "s/^X//" >'man1/install.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: shell script to install section 1 manual pages
- X#
- Xcase $# in
- X1)
- X ;;
- X*)
- X echo "usage: $0 somewhere/man1" 1>&2
- X exit 1
- X ;;
- Xesac
- X
- Xset -e
- Xcd man1
- Xfor file in *.1
- Xdo
- X echo "soelim $file > $1/$file"
- X soelim $file > $1/$file
- Xdone
- Xexit 0
- END_OF_FILE
- if test 1032 -ne `wc -c <'man1/install.sh'`; then
- echo shar: \"'man1/install.sh'\" unpacked with wrong size!
- fi
- # end of 'man1/install.sh'
- fi
- if test ! -d 'roffpp' ; then
- echo shar: Creating directory \"'roffpp'\"
- mkdir 'roffpp'
- fi
- if test -f 'roffpp/preprocess.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'roffpp/preprocess.h'\"
- else
- echo shar: Extracting \"'roffpp/preprocess.h'\" \(1044 characters\)
- sed "s/^X//" >'roffpp/preprocess.h' <<'END_OF_FILE'
- X/*
- X * cook - file construction tool
- X * Copyright (C) 1992, 1993 Peter Miller.
- X * All rights reserved.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X * MANIFEST: interface definition for roffpp/preprocess.c
- X */
- X
- X#ifndef PREPROCESS_H
- X#define PREPROCESS_H
- X
- X#include <main.h>
- X
- Xvoid preprocess_include _((char *));
- Xvoid preprocess _((char *infile, char *outfile));
- X
- X#endif /* PREPROCESS_H */
- END_OF_FILE
- if test 1044 -ne `wc -c <'roffpp/preprocess.h'`; then
- echo shar: \"'roffpp/preprocess.h'\" unpacked with wrong size!
- fi
- # end of 'roffpp/preprocess.h'
- fi
- if test ! -d 'test' ; then
- echo shar: Creating directory \"'test'\"
- mkdir 'test'
- fi
- if test ! -d 'test/00' ; then
- echo shar: Creating directory \"'test/00'\"
- mkdir 'test/00'
- fi
- if test -f 'test/00/t0001a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0001a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0001a.sh'\" \(1319 characters\)
- sed "s/^X//" >'test/00/t0001a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "and" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "and"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [ and 0 0 ] then fail;
- X if [ and 0 1 ] then fail;
- X if [ and 1 0 ] then fail;
- X if [not [ and 1 1 ]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1319 -ne `wc -c <'test/00/t0001a.sh'`; then
- echo shar: \"'test/00/t0001a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0001a.sh'
- fi
- if test -f 'test/00/t0003a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0003a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0003a.sh'\" \(1287 characters\)
- sed "s/^X//" >'test/00/t0003a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test "collect" builtin function
- X#
- X
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "collect"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X answer = [collect echo a b c];
- X if [not [in [count [answer]] 3]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1287 -ne `wc -c <'test/00/t0003a.sh'`; then
- echo shar: \"'test/00/t0003a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0003a.sh'
- fi
- if test -f 'test/00/t0004a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0004a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0004a.sh'\" \(1309 characters\)
- sed "s/^X//" >'test/00/t0004a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test "collect_lines" builtin function
- X#
- X
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of the builtin function "collect_lines"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X answer = [collect_lines echo a b c];
- X if [not [in [count [answer]] 1]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1309 -ne `wc -c <'test/00/t0004a.sh'`; then
- echo shar: \"'test/00/t0004a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0004a.sh'
- fi
- if test -f 'test/00/t0006a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0006a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0006a.sh'\" \(1297 characters\)
- sed "s/^X//" >'test/00/t0006a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "defined" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "defined"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtrythis = snit;
- Xtest:
- X{
- X if [defined foo] then fail;
- X if [not [defined trythis]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1297 -ne `wc -c <'test/00/t0006a.sh'`; then
- echo shar: \"'test/00/t0006a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0006a.sh'
- fi
- if test -f 'test/00/t0008a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0008a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0008a.sh'\" \(1262 characters\)
- sed "s/^X//" >'test/00/t0008a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "downcase" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "downcase"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [in [downcase ABcd] abcd]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1262 -ne `wc -c <'test/00/t0008a.sh'`; then
- echo shar: \"'test/00/t0008a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0008a.sh'
- fi
- if test -f 'test/00/t0010a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0010a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0010a.sh'\" \(1303 characters\)
- sed "s/^X//" >'test/00/t0010a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "execute" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "execute"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [execute sh -c \'exit 1\'] then fail;
- X if [not [execute sh -c \'exit 0\']] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1303 -ne `wc -c <'test/00/t0010a.sh'`; then
- echo shar: \"'test/00/t0010a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0010a.sh'
- fi
- if test -f 'test/00/t0011a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0011a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0011a.sh'\" \(1285 characters\)
- sed "s/^X//" >'test/00/t0011a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "exists" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "exists"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [exists bullshit] then fail;
- X if [not [exists Howto.cook]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1285 -ne `wc -c <'test/00/t0011a.sh'`; then
- echo shar: \"'test/00/t0011a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0011a.sh'
- fi
- if test -f 'test/00/t0012a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0012a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0012a.sh'\" \(1356 characters\)
- sed "s/^X//" >'test/00/t0012a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "find_command" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "find_command"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [find_command really_stupid] then fail;
- X if [not [in [find_command sh] /bin/sh /usr/bin/sh /usr/ucb/sh
- X /sbin/sh ] ] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1356 -ne `wc -c <'test/00/t0012a.sh'`; then
- echo shar: \"'test/00/t0012a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0012a.sh'
- fi
- if test -f 'test/00/t0013a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0013a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0013a.sh'\" \(1353 characters\)
- sed "s/^X//" >'test/00/t0013a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "fromto" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "fromto"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [in [fromto %.c %.o foobar.c] foobar.o]] then fail;
- X if [not [in [fromto %1/%2.c %1/%2.o snot/foobar.c] snot/foobar.o]]
- X then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1353 -ne `wc -c <'test/00/t0013a.sh'`; then
- echo shar: \"'test/00/t0013a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0013a.sh'
- fi
- if test -f 'test/00/t0014a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0014a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0014a.sh'\" \(1309 characters\)
- sed "s/^X//" >'test/00/t0014a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "getenv" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "getenv"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [in [getenv HOME] $HOME]] then fail;
- X if [not [in [getenv LOGNAME] $LOGNAME]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1309 -ne `wc -c <'test/00/t0014a.sh'`; then
- echo shar: \"'test/00/t0014a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0014a.sh'
- fi
- if test -f 'test/00/t0016a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0016a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0016a.sh'\" \(1361 characters\)
- sed "s/^X//" >'test/00/t0016a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "match" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "match"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [match %.a balsup] then fail;
- X if [not [match %.c foo.c]] then fail;
- X if [matches %.a balsup] then fail;
- X if [not [matches %.c foo.c]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1361 -ne `wc -c <'test/00/t0016a.sh'`; then
- echo shar: \"'test/00/t0016a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0016a.sh'
- fi
- if test -f 'test/00/t0017a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0017a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0017a.sh'\" \(1355 characters\)
- sed "s/^X//" >'test/00/t0017a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "head" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "head"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [in [head ab cd ef] ab]] then fail;
- X if [not [in [head ab cd] ab]] then fail;
- X if [not [in [head ab] ab]] then fail;
- X if [head] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1355 -ne `wc -c <'test/00/t0017a.sh'`; then
- echo shar: \"'test/00/t0017a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0017a.sh'
- fi
- if test -f 'test/00/t0019a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0019a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0019a.sh'\" \(1283 characters\)
- sed "s/^X//" >'test/00/t0019a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "in" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "in"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [in a b c d] then fail;
- X if [in a] then fail;
- X if [not [in a a]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1283 -ne `wc -c <'test/00/t0019a.sh'`; then
- echo shar: \"'test/00/t0019a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0019a.sh'
- fi
- if test -f 'test/00/t0020a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0020a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0020a.sh'\" \(1319 characters\)
- sed "s/^X//" >'test/00/t0020a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "match_mask" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "match_mask"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [match_mask %.c foo bar baz] then fail;
- X if [not [match_mask %.c foo.o bar.c baz.y]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1319 -ne `wc -c <'test/00/t0020a.sh'`; then
- echo shar: \"'test/00/t0020a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0020a.sh'
- fi
- if test -f 'test/00/t0021a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0021a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0021a.sh'\" \(1282 characters\)
- sed "s/^X//" >'test/00/t0021a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "mtime" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "mtime"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [mtime not_there] then fail;
- X if [not [mtime Howto.cook]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1282 -ne `wc -c <'test/00/t0021a.sh'`; then
- echo shar: \"'test/00/t0021a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0021a.sh'
- fi
- if test -f 'test/00/t0022a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0022a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0022a.sh'\" \(1286 characters\)
- sed "s/^X//" >'test/00/t0022a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "not" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "not"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [not]] then fail;
- X if [not foo] then fail;
- X if [not [not 0]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1286 -ne `wc -c <'test/00/t0022a.sh'`; then
- echo shar: \"'test/00/t0022a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0022a.sh'
- fi
- if test -f 'test/00/t0023a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0023a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0023a.sh'\" \(1317 characters\)
- sed "s/^X//" >'test/00/t0023a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "or" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "or"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [or 0 0] then fail;
- X if [not [or 0 1]] then fail;
- X if [not [or 1 0]] then fail;
- X if [not [or 1 1]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1317 -ne `wc -c <'test/00/t0023a.sh'`; then
- echo shar: \"'test/00/t0023a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0023a.sh'
- fi
- if test -f 'test/00/t0025a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0025a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0025a.sh'\" \(1259 characters\)
- sed "s/^X//" >'test/00/t0025a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "prepost" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "prepost"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [in [prepost a b c] acb]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1259 -ne `wc -c <'test/00/t0025a.sh'`; then
- echo shar: \"'test/00/t0025a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0025a.sh'
- fi
- if test -f 'test/00/t0026a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0026a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0026a.sh'\" \(1323 characters\)
- sed "s/^X//" >'test/00/t0026a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "quote" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "quote"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [in [quote snot] '"snot"']] then fail;
- X if [not [in [quote [quote snot]] '"\\\\"snot\\\\""']] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1323 -ne `wc -c <'test/00/t0026a.sh'`; then
- echo shar: \"'test/00/t0026a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0026a.sh'
- fi
- if test -f 'test/00/t0028a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0028a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0028a.sh'\" \(1256 characters\)
- sed "s/^X//" >'test/00/t0028a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the "tail" builtin function
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of builtin function "tail"' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook <<foobar
- Xtest:
- X{
- X if [not [in [count [tail a b c]] 2]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1256 -ne `wc -c <'test/00/t0028a.sh'`; then
- echo shar: \"'test/00/t0028a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0028a.sh'
- fi
- if test -f 'test/00/t0029a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0029a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0029a.sh'\" \(1221 characters\)
- sed "s/^X//" >'test/00/t0029a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the cook -Book option
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of the cook -Book option' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > barf <<foobar
- Xtest:
- X{
- X echo "Hi, Mom";
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -book barf -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1221 -ne `wc -c <'test/00/t0029a.sh'`; then
- echo shar: \"'test/00/t0029a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0029a.sh'
- fi
- if test -f 'test/00/t0033a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0033a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0033a.sh'\" \(1095 characters\)
- sed "s/^X//" >'test/00/t0033a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the c_incl program
- X#
- X
- Xfail()
- X{
- X echo 'FAILED test of the c_incl program' 1>&2
- X exit 1
- X}
- Xpass()
- X{
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xfoo='dummy!@#$%file'
- X
- Xbin/c_incl -nc $foo
- Xif test $? -ne 1 ; then fail; fi
- X
- Xbin/c_incl -nc -eia $foo
- Xif test $? -ne 0 ; then fail; fi
- X
- Xpass
- END_OF_FILE
- if test 1095 -ne `wc -c <'test/00/t0033a.sh'`; then
- echo shar: \"'test/00/t0033a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0033a.sh'
- fi
- if test -f 'test/00/t0035a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0035a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0035a.sh'\" \(1317 characters\)
- sed "s/^X//" >'test/00/t0035a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the %0 pattern, it must not match absolute paths
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of the "%0" pattern' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook << 'foobar'
- Xtest:
- X{
- X if [match_mask %0%1 /foo/bar] then fail;
- X if [not [match_mask /%0%1 /foo/bar ]] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1317 -ne `wc -c <'test/00/t0035a.sh'`; then
- echo shar: \"'test/00/t0035a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0035a.sh'
- fi
- if test -f 'test/00/t0036a.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test/00/t0036a.sh'\"
- else
- echo shar: Extracting \"'test/00/t0036a.sh'\" \(1272 characters\)
- sed "s/^X//" >'test/00/t0036a.sh' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# cook - file construction tool
- X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
- X# All rights reserved.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X# MANIFEST: test the %1, etc, patterns
- X# they may not match the empty string
- X#
- Xtmp=/tmp/$$
- Xhere=`pwd`
- X
- Xfail()
- X{
- X echo 'FAILED test of "%n" patterns' 1>&2
- X cd $here
- X rm -rf $tmp
- X exit 1
- X}
- Xpass()
- X{
- X cd $here
- X rm -rf $tmp
- X exit 0
- X}
- Xtrap "fail" 1 2 3 15
- X
- Xmkdir $tmp
- Xcd $tmp
- X
- Xcat > Howto.cook << 'foobar'
- Xtest:
- X{
- X if [match_mask %1/%2 /foo] then fail;
- X}
- Xfoobar
- Xif test $? -ne 0 ; then fail; fi
- X
- X$here/bin/cook -nl
- Xif test $? -ne 0 ; then fail; fi
- X
- X# probably OK
- Xpass
- END_OF_FILE
- if test 1272 -ne `wc -c <'test/00/t0036a.sh'`; then
- echo shar: \"'test/00/t0036a.sh'\" unpacked with wrong size!
- fi
- # end of 'test/00/t0036a.sh'
- fi
- echo shar: End of archive 1 \(of 11\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 11 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-